<template>
	<div class="child1">
		<h3>子组件01</h3>
    <button @click="sendMsg">发送消息给父组件</button>
	</div>
</template>

<script>
	export default {
		name:'child1-component',
		data(){
			return {
				msg:'组件01的信息'
			}
		},
    methods:{
      sendMsg(){
        this.getMsgFromChild1(this.msg)
      }
    },
    props:['getMsgFromChild1']
	}
</script>

<style scoped>
.child1{
  background: gray;
}
</style>